//
//  NSTimer+LTM_System.m
//  LTM_Lib_System_Objc
//
//  Created by 柯南 on 2021/12/17.
//

#import "NSTimer+LTM_System.h"

@implementation NSTimer (LTM_System)
- (void)pauseTimer {
    if (![self isValid]) {
        return;
    }
    [self setFireDate:[NSDate distantFuture]];
}

- (void)resumeTimer {
    if (![self isValid]) {
        return;
    }
    [self setFireDate:[NSDate date]];
}

- (void)resumeTimerAfterTimeInterval:(NSTimeInterval)interval {
    if (![self isValid]) {
        return;
    }
    [self setFireDate:[NSDate dateWithTimeIntervalSinceNow:interval]];
}
@end
